<!-- START:head -->
<!--nhung nhieu view vao layout chung, don gian la su dung PARTIAL NHU DONG 23 DO  -->
<!DOCTYPE html>
<html>
<head>
  <title>Depot Nguyen Thanh Linh </title>
 <%= stylesheet_link_tag "scaffold" %>
 <%= stylesheet_link_tag "depot", :media=> "all" %>
 <%= javascript_include_tag :defaults %>
 <%= csrf_meta_tag %>
</head>
<body id="store">
 <div id="banner">
 <b><%= image_tag("/images/logo.png") %></b>
 <%= @page_title || "Pragmatic Bookshelf" %>
 </div>
 <div id="columns">
  <div id="side">
    <!--  goi partial _cart.html.erb, do partial la toan cuc , goi chi can bien cung ten la ok
     can set gia tri cho bient @cart trong index cua store controller
     do root ta mac tinh chuyen sang store/indx-->
    <div id="cart">
     <% if @cart %>
      <% if @cart.line_items.empty? %>
          style = "display: none"
      <% end %>
      >
      <%= render @cart %>
     <%end %>
  </div>
   <a href="http://localhost:3000/">Home</a><br/>
   <a href="http://www..../faq">Questions</a><br/>
    <a href="http://www..../news">News</a><br/>
   <a href="http://www..../contact">Contact</a><br/>
    <!-- START_HIGHLIGHT -->
     <!--chi hien cac menu nay khi ta da login o 1 session  -->
    <% if session[:user_id] %>
        <br />
        <%= link_to 'Orders',   orders_path   %><br />
        <%= link_to 'Products', products_path %><br />
        <%= link_to 'Users',    users_path    %><br />
        <br />
        <%= button_to 'Logout', logout_path, :method => :delete   %>
    <% end %>
    <!-- END_HIGHLIGHT -->

  </div>
  <div id="main">
  <%= yield %>
  </div>
 </div>
</body>
</html>
